Passed
Push — master ( 1ff847...a1e431 )
by
unknown
02:16
created

Contact1633700963101   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A down 0 3 1
A up 0 4 1
1
import { MigrationInterface, QueryRunner } from 'typeorm';
2
3
export class Contact1633700963101 implements MigrationInterface {
4
  name = 'Contact1633700963101';
5
6
  public async up(queryRunner: QueryRunner): Promise<void> {
7
    await queryRunner.query(
8
      `CREATE TABLE "contact" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, "firstName" character varying, "lastName" character varying, "company" character varying, "email" character varying, "phoneNumber" character varying, "notes" character varying, CONSTRAINT "PK_2cbbe00f59ab6b3bb5b8d19f989" PRIMARY KEY ("id"))`
9
    );
10
  }
11
12
  public async down(queryRunner: QueryRunner): Promise<void> {
13
    await queryRunner.query(`DROP TABLE "contact"`);
14
  }
15
}
16